package com.video.controller;

import com.common.domain.dto.DraftVideoItemAddVideoUrlDTO;
import com.common.result.Result;
import com.video.service.DraftVideoItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 路亚
 * @version 0.1
 * @className DraftVideoItemController
 * @description
 * @date 2024/12/12 10:08
 * @since jdk11
 */
@RestController
@RequestMapping("/draft/videoItem")
@RequiredArgsConstructor
@Slf4j
@Api(tags = "草稿视频行管理")
public class DraftVideoItemController {

    private final DraftVideoItemService draftVideoItemService;

    @PostMapping("/add/videoUrl")
    @ApiOperation("添加视频地址")
    public Result addVideoUrl(@RequestBody List<DraftVideoItemAddVideoUrlDTO> dtoList){
        log.info("添加视频地址,dtoList:{}", dtoList);
        draftVideoItemService.addVideoUrl(dtoList);
        return Result.success();
    }
}
